//
//  CalculateLabelHeight.m
//  PorjectA
//
//  Created by zhilianhe on 15/12/5.
//  Copyright © 2015年 zhilianhe. All rights reserved.
//

#import "CalculateLabelHeight.h"
#define kWidth [[UIScreen mainScreen] bounds]
@implementation CalculateLabelHeight
+(CGFloat)giveLabel:(UILabel *)label andSizeOfLetter:(CGFloat)letter{
    CGRect rectLabel = [label.text boundingRectWithSize:CGSizeMake(kWidth.size.width * 0.98, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:letter]} context:nil];
    CGFloat floatLabel = rectLabel.size.height;
    return floatLabel;
}
@end
